import request from '../uitls/request'

// 修改用户密码
export function updateUserPass(id,data){
    return request.post(`/user/${id}`,data)
}

//通过用户Id查询个人资料
export function getUserById(id) {
    return request.get(`user/getUserinfo/${id}`)
}
//编辑个人资料

export function editUserInfo(id,data) {
    return request.post(`user/alter_userinfo/${id}`,data)
}
//查询所有用户信息
export function getUsers(param) {
    return request.get(`/user`,{params:param})
}
//添加用户
export function addUser(data){
    return request.post(`/user`,data)
}
//修改用户信息
export function editUser(id,data){
    return request.put(`/user/${id}`,data)
}

//登录
export function login(data){
    return request.post(`/user/login`,data)
}


// 注册
export function register(data){
    return request.post('/userRegister',data)
}
//查询
export function foundUser(param){
    return request.get(`/user/found`,{params:param})
}
//伪删除
export function deleteUser(id){
    return request.delete(`/user/${id}`)
}